<html>	
				<head>
					<title>title</title>
				</head>
				<body>
                    <div id = "input">
                        <FONT color='black' id = "bk">Hello World</font><br/>
                    </div>
					
					
					<!--<font color='green'>Hello World</font> -->
                    
                <input type="button" id="red" value="红色">
                <input type="button" id="black" value="默认">

                <script type="text/javascript">
                    var an=document.getElementsByTagName('input');
                    var bk=document.getElementById('bk');
                    for(var i=0;i<an.length;i++)
                    {
                        an[i].onclick=function()
                        {
                            var mycl=this .getAttribute('id');
                            bk.style.color=mycl;
                        }
                    }
                </script>
  			    </body>
		
</html>

